package com.leisurexi.ioc.circular.reference;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

/**
 * @author: leisurexi
 * @date: 2020-06-27 19:14
 * @since JDK 1.8
 */
public class NoSingletonCircularReferenceDemo {

	public static void main(String[] args) {
		DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
		XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanFactory);
		reader.loadBeanDefinitions("META-INF/no-singleton-circular-reference.xml");
		A a = beanFactory.getBean("a", A.class);
		System.err.println(a);
	}

}
